<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<!-- saved from url=(0060)http://web.hand999.com/daili_mobile/modipass.php?agid=544677 -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>商户管理系统</title>
<meta name="Keywords" content="">
<meta name="Description" content="">
<meta http-equiv="Cache-Control" content="no-cache">
<meta name="MobileOptimized" content="240">

<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">        
<!-- Mobile Devices Support @begin -->
  
  <meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
  <meta content="no-cache" http-equiv="pragma">
  <meta content="0" http-equiv="expires">
  <meta content="telephone=no, address=no" name="format-detection">
  <meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="/admin/agent_admin/Public/home/css/public.css" media="all">
<link rel="stylesheet" type="text/css" href="/admin/agent_admin/Public/home/css/style.css" media="all">
<script src="/admin/agent_admin/Public/home/js/jquery-2.1.0.min.js.下载"></script>
</head>

<body class="body">
	<div class="page_top_box">
    <center>
        <div class="page_top">
            <a href="javascript:void(0)" onclick="history.go(-1)" class="back"><img src="/admin/agent_admin/Public/home/images/ico_back.png"></a>
            <div class="pg_name" onclick="location.reload()">密码重置</div>
        </div>
    </center>
    </div>

    <div class="put_box">
	<form id="myform" name="form1" method="post" action=""> 
    	<!-- <div class="put"> -->
        	<!-- <label class="lb">旧密码：</label> -->
            <!-- <input id="ppass" name="password" type="password" value="" class="txt"> -->
        <!-- </div> -->
        <div class="put">
        	<label class="lb">新密码：</label>
            <input id="pword" name="ppass" maxlength="10" placeholder="请输入6-10 位的纯数字密码" type="password" value="" class="txt">
        </div>
        <div class="put">
        	<label class="lb">确认密码：</label>
            <input id="pword" name="cword" maxlength="10" placeholder="请输入6-10 位的纯数字密码" type="password" value="" class="txt">
        </div>
        <div class="btn">
        	<input type="submit" value="确定" class="btn">
        </div>
	</form>
    </div>
    
    <div class="pg_foot_box">
<center>
    <div class="pg_foot">
        <a href="<?php echo U('Index/indexx') ?>">商户管理平台</a>
    </div>
</center>
</div>    
     <div id="hintbox" class="hint_box">
        <span id="hintmsg"></span>
    </div>   
    <script type="text/javascript">
		function checkForm(){
			if($("#ppass").val() == ""){
				hintPop("请输入旧密码！"); return false;
			}
			if($("#pword").val() == ""){
				hintPop("请输入新密码！"); return false;
			}
			if($("#cword").val() == ""){
				hintPop("请输入确认密码！"); return false;
			}
			if($("#pword").val() != $("#cword").val()){
				hintPop("确认密码与新密码不一致，请重新输入...");
				$("#pword").val(''); $("#cword").val('');
				return false;
			}
			
			modiPass();
		}
		
		function modiPass(){
			$.post("prog.php?ac=user&do=mpass",
				{
					cmd:"pdkpass",
					timestamp:"1482823197",
					sign:"745a67cd74de9997aa9536b564b12dd9",
					agid:"544677",
					cword:$("#ppass").val(),
					nword:$("#cword").val()
				},
				function(data, status){
					if(status == "success"){
						v = $.parseJSON(data);

						if(v.result == 0){							
							hintPop(v.errorMsg);return false;
						}else{
							hintPop(v.errorMsg);
							window.location.href="myinfo.php";
						}
					}
				}
			);
		}
		
		function hintPop(msg){
			$("#hintmsg").html(msg);
			$("#hintbox").css({"opacity": "1", "display": "block"});
			$("#hintbox").animate({"bottom":"80px"}, "last", function(){
				setTimeout(function(){
					$("#hintbox").animate({"opacity": "0"}, "last", function(){
						$("#hintbox").css({"bottom":"0px", "display": "none"});
					});
				}, 2000);
			});
		}
	</script>

</body></html>